package com.wx.service.impl;

import com.wx.dao.ProductsDao;
import com.wx.model.PageModel;
import com.wx.model.ProductModel;
import com.wx.service.IProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IProductsServiceImpl implements IProductsService {
    @Autowired
    ProductsDao productsDao;

    @Override
    public List<ProductModel> producatsFindAll(PageModel pageModel) {
        return productsDao.producatsFindAll(pageModel);
    }

    @Override
    public int getCount(PageModel pageModel) {
        return productsDao.getCount(pageModel);
    }

    @Override
    public List<ProductModel> producatsFindTh(ProductModel productModel) {
        return productsDao.producatsFindTh(productModel);
    }

    @Override
    public int getThCount(ProductModel productModel) {
        return productsDao.getThCount(productModel);
    }

    @Override
    public int producatsAdd(ProductModel productModel) {
        return productsDao.producatsAdd(productModel);
    }

    @Override
    public ProductModel producatsFindById(ProductModel productModel) {
        return productsDao.producatsFindById(productModel);
    }

    @Override
    public int producatsUpdate(ProductModel productModel) {
        return productsDao.producatsUpdate(productModel);
    }

    @Override
    public int deleteById(ProductModel productModel) {
        return productsDao.deleteById(productModel);
    }

    @Override
    public List<ProductModel> producatspageFindAll() {
        return productsDao.producatspageFindAll();
    }

    @Override
    public List<ProductModel> producatsPage(ProductModel productModel) {
        return productsDao.producatsPage(productModel);
    }

    @Override
    public int getcount(ProductModel productModel) {
        return productsDao.getcount(productModel);
    }
}
